# Generated by Django 2.2.16 on 2020-12-09 19:30

import django.core.validators
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("orga", "0008_auto_20200518_0322"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("challenge", "0075_remove_WS_from_season"),
    ]

    operations = [
        migrations.CreateModel(
            name="Registration",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("date", models.DateField(verbose_name="Date")),
                (
                    "day_time",
                    models.IntegerField(
                        choices=[(0, "Matin"), (1, "Après-midi")], default=0
                    ),
                ),
                (
                    "classes_amount",
                    models.IntegerField(
                        default=1,
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(6),
                        ],
                        verbose_name="Nb de classes (1 à 6)",
                    ),
                ),
                (
                    "coordinator",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "organization",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="orga.Organization",
                    ),
                ),
            ],
        ),
    ]
